@page
@model DemoModel
@using Microsoft.AspNetCore.Mvc.RazorPages

@functions
{
    public class DemoModel : PageModel
    {
        public string Title { get; set; }
        public string Message { get; private set; }

        public void OnGet()
        {
            Title = "This is a RazorPage coming from OrchardCore.Demo!";
            Message = $"Date and time on the server: { DateTime.Now.ToString() }";
        }
    }
}

@await Html.PartialAsync("Header", Model)
<h2>Hello from @ViewContext.RouteData.Values["page"]</h2>
<p>
    @T[Model.Message]
</p>
<p>
    Date using the DateTimeShape: @await DisplayAsync(await New.DateTime(Utc: null, Format: T["MMMM dd, yyyy"].Value))
</p>
